define("textCommon",["lodash","santa-components","componentsCore","prop-types","skins"],function(t,e,n,i,a){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var a=e[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(i,a,function(e){return t[e]}.bind(null,a));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1167)}({0:function(e,n){e.exports=t},1167:function(t,e,n){var i,a;i=[n(1168),n(1169),n(1170)],void 0===(a=function(t,e,n){"use strict";return{textScaleMixin:t,baseTextInput:e,labelUtils:n}}.apply(e,i))||(t.exports=a)},1168:function(t,e,n){var i,a;i=[n(5),n(2)],void 0===(a=function(t,e){"use strict";return e.mixins.textScaleMixin(t.skinsMap)}.apply(e,i))||(t.exports=a)},1169:function(t,e,n){var i,a;i=[n(0),n(4),n(2),n(3)],void 0===(a=function(t,e,n,i){"use strict";var a={style:{display:"none"}},o=function(e,n){"number"===e.type&&t.assign(e,{min:n.min,max:n.max}),n.maxLength&&t.assign(e,{maxLength:n.maxLength})},s=function(e,n){n.step&&"number"===e.type&&t.assign(e,{step:n.step})};function r(){var e=this.props.compProp,n=this.props.compData,i={type:n.textType,name:n.name||this.props.structure.nickname,value:this.state.value,onChange:this._handleChange,onBlur:this._handleBlur,onFocus:this._handleFocus,onClick:this._handleClick,onKeyDown:this._handleKeyDown,onInput:this._handleInput,disabled:e.isDisabled,required:e.required,readOnly:e.readOnly,placeholder:n.placeholder||e.placeholder,tabIndex:e.tabIndex};return n.pattern&&t.assign(i,{pattern:n.pattern}),o(i,n),s(i,n),e.autoComplete&&"password"!==i.type&&(i.autoComplete="on"),i}var l=function(t){return n.mixins.validatableMixin.getPublicState(t)};return{mixins:[i.mixins.skinBasedComp,n.mixins.runTimeCompData,n.mixins.validatableMixin.validatable,n.mixins.compStateMixin(l)],propTypes:{compData:n.santaTypesDefinitions.Component.compData.isRequired,compProp:n.santaTypesDefinitions.Component.compProp.isRequired,structure:n.santaTypesDefinitions.Component.structure.isRequired,shouldResetComponent:n.santaTypesDefinitions.RenderFlags.shouldResetComponent,isPreset:e.bool,onChange:e.func,message:e.string},BASE_TEXT_BEHAVIORS:t.assign({},n.mixins.validatableMixin.VALIDATABLE_BEHAVIORS),getInitialState:function(){return t.assign(l(),{value:this.props.compData.value})},componentWillReceiveProps:function(e){e.shouldResetComponent&&e.shouldResetComponent!==this.props.shouldResetComponent&&this.hideValidityIndication();var n={};t.has(e.compData,"value")&&e.compData.value!==this.state.value&&(n.value=e.compData.value),this.setState(n)},_handleClick:function(t){this.props.isPreset&&t.target.select()},setCustomValidity:function(t){this.refs.input.setCustomValidity(t)},_handleChange:function(t){var e=t.target.value;e!==this.state.value&&(this.setState({value:e},function(){this.updateData({value:e})}.bind(this)),this.hideValidityIndication(),this.latestChangeEvent=t)},_handleBlur:function(t){this.props.onChange&&this.props.onChange(t),this.handleAction("blur",t),this.latestChangeEvent&&(this.handleAction("change",this.latestChangeEvent),this.latestChangeEvent=null),this.showValidityIndication()},_handleFocus:function(t){this.handleAction("focus",t)},_handleKeyDown:function(t){this.handleAction("keyPress",t)},_handleInput:function(t){this.handleAction("onInput",t)},getBaseTextInputSkinProperties:function(){return{input:r.call(this),message:this.props.message?{children:this.props.message,style:{whiteSpace:"normal",display:"table"}}:a}}}}.apply(e,i))||(t.exports=a)},1170:function(t,e,n){var i,a;i=[n(0)],void 0===(a=function(t){"use strict";return{minInputHeight:25,defaultInputHeight:42,measureComponentWithLabel:function(e,n,i,a){var o,s=e.inputHeight,r=e.inputHeightMobile,l=e.labelMargin,u=a&&r?r:s;if(this.hasLabel(i)){var p=(t.isNumber(l)?l:14)+n.offsetHeight,c=(u||42)+p;o=Math.max(25+p,c)}else u&&(o=Math.max(25,u));return o},getLabelPadding:function(t){var e=t.textAlignment,n=t.labelPadding,i=t.filesAlignment;switch(e||i){case"left":return{paddingLeft:n,paddingRight:"20px"};case"right":return{paddingRight:n,paddingLeft:"20px"};default:return{}}},getLabelFntStyle:function(e,n){if(n){var i=e.fontSize?Number(e.fontSize.replace("px","")):0,a=t.max([16,i]);e.fontSize="".concat(a,"px")}return e},getLabelStyle:function(e,n,i,a){var o=e.textAlignment,s=e.labelMargin,r=e.filesAlignment,l=this.getLabelPadding(e),u=this.getLabelFntStyle(n,i),p=o||r;return t.merge(l,u,{display:this.hasLabel(a)?"inline-block":"none",marginBottom:t.isNumber(s)?s:14,textAlign:p,direction:"right"===p?"rtl":"ltr"})},hasLabel:function(t){return!!t.label},showRequired:function(e,n,i){var a=t.get(i,"style.properties.txtlblrq"),o=a&&"transparent"!==a;return this.hasLabel(e)&&n.required&&o},getBaseInputWithLabelSkinProperties:function(t){var e=t.compProp,n=t.rawFontSyle,i=t.isMobileView,a=t.compData,o=t.id,s=o.compId,r=o.inputId;return{label:{children:a.label,style:this.getLabelStyle(e,n,i,a),htmlFor:"".concat(s).concat(r)}}}}}.apply(e,i))||(t.exports=a)},2:function(t,n){t.exports=e},3:function(t,e){t.exports=n},4:function(t,e){t.exports=i},5:function(t,e){t.exports=a}})}); //# sourceMappingURL=textCommon.min.js.map